package IBBB;

import IBBB.view.ScheduleBox;
import IBBB.view.testFxml;
import javafx.application.Application;
import javafx.beans.binding.Bindings;
import javafx.beans.binding.StringBinding;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;

public class TestMain extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception{
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(getClass().getResource("view/CompleteWordPane.fxml"));
        Parent h = loader.load();
        //ScheduleBox s = loader.getController();
        primaryStage.setTitle("IBBB");
        primaryStage.setScene(new Scene(h, 600, 400));
        primaryStage.show();

        primaryStage.setOnCloseRequest(windowEvent -> {
            //testFxml t = loader.getController();

            //String s = t.editor.get
            //System.out.println(s);
        });
    }


    public static void main(String[] args) {
        launch(args);
    }
}

//public class TestMain {
//    public static void main(String[] args) {
//        StringProperty a = new SimpleStringProperty("a");
//        StringProperty b = new SimpleStringProperty("b");
//        StringBinding s = Bindings.createStringBinding(()->{
//            return a.get() + b.get();
//        }, a, b);
//
//        System.out.println(s.get());
//        a.set("c");
//        b.set("5");
//        System.out.println(s.get());
//    }
//}
